package day_06;

/**
 * @ClassName MyDate
 * @Description TODO
 * @Author hp
 * @Date 2021/6/7 21:06
 * @Version 1.0
 **/
class MyDate {
    private String year;
    private String month;
    private String day;

    public String getYear() {
        return year;
    }

    public void setYear(String year) {
        this.year = year;
    }

    public String getMonth() {
        return month;
    }

    public void setMonth(String month) {
        this.month = month;
    }

    public String getDay() {
        return day;
    }

    public void setDay(String day) {
        this.day = day;
    }

    @Override
    public String toString() {
        return "MyDate{" +
                "year='" + year + '\'' +
                ", month='" + month + '\'' +
                ", day='" + day + '\'' +
                '}';
    }
}

class Employee{
    private String name;
    MyDate date = new MyDate();

    public Employee(String name, MyDate date) {
        this.name = name;
        this.date = date;
    }

    public Employee() {

    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public MyDate getDate() {
        return date;
    }

    public void setDate(MyDate date) {
        this.date = date;
    }

    @Override
    public String toString() {
        return "Employee{" +
                "name='" + name + '\'' +
                ", date=" + date.toString() +
                '}';
    }
}
class  test01{
    public static void main(String[] args) {
        MyDate myDate = new MyDate();
        MyDate myDate1 = new MyDate();
        myDate.setYear("1998");
        myDate.setMonth("05");
        myDate.setDay("18");
        myDate1.setYear("1999");
        myDate1.setMonth("05");
        myDate1.setDay("12");
        Employee employee = new Employee("冉佳奇",myDate);
        System.out.println(employee.toString());
        Employee employee2 = new Employee("xxx",myDate1);
        System.out.println(employee2.toString());

    }
}

